//
//  Invoice+CoreDataProperties.swift
//  AccountingHelper
//
//  Created by 泽 on 5/27/25.
//
//

import Foundation
import CoreData


extension Invoice {
    
    @nonobjc public class func fetchRequest() -> NSFetchRequest<Invoice> {
        return NSFetchRequest<Invoice>(entityName: "Invoice")
    }
    
    /// 发票类型代码，例如：增值税电子普通发票为"032"，增值税电子专用发票为"031"
    @NSManaged public var typeCode: String
    
    /// 发票代码，纸质发票为10或12位，电子发票为12位
    @NSManaged public var invoiceCode: String
    
    /// 发票号码，纸质发票为8位，电子发票可能不存在
    @NSManaged public var invoiceNumber: String?
    
    /// 发票流水号，作为唯一标识
    @NSManaged public var serialNumber: String
    
    /// 发票金额（不含税），精确到分
    @NSManaged public var amount: NSDecimalNumber
    
    /// 开票日期
    @NSManaged public var issueDate: Date
    
    /// 校验码，纸质发票为后6位，电子发票为完整校验码
    @NSManaged public var checkCode: String
    
}

extension Invoice : Identifiable {
    
}
